package com.brainydroid.framework;

import com.brainydroid.items.*;

/**
 * Class to create objects and link them to the scene
 * @author vincent
 *
 */
public class Create {
	
	static Scene scene_;
	
	/**
	 * Initial link to scene
	 * @param s
	 */
	public Create(Scene s){
		scene_ = s;
	}
	
	public static void init(Scene s){
		scene_ = s;
	}
	
	/**
	 * Create button
	 * @param x
	 * @param y
	 * @param w
	 * @param h
	 * @param color
	 * @return
	 */
	public static Button newButton(float x, float y, float w, float h, int color){
		Button b = (Button)scene_.addObject(new Button( x,  y,  w,  h,  color));
		return b;
	}
	
	/**
	 * Create textbox
	 * @param x
	 * @param y
	 * @param s
	 * @param color
	 * @return
	 */
	public static Text_box newText_box(float x, float y, String s, int color){
		Text_box b = (Text_box)scene_.addObject(new Text_box( x,  y,  s,  color));
		return b;
	}

	/**
	 * Create Circular button
	 * @param x
	 * @param y
	 * @param r
	 * @param c
	 * @return
	 */
	public static CircularButton newCircularButton(float x, float y, float r, int c) {
		CircularButton cb = (CircularButton)scene_.addObject(new CircularButton( x,  y, r,  c));
		return cb;
	}

	public static Time_jauge newTimejauge(float x, float y, float w, float h, float onset_time ,float duration) {
		// TODO Auto-generated method stub
		Time_jauge tj = (Time_jauge)scene_.addObject(new Time_jauge( x,  y, w,  h,onset_time, duration));
		return tj;
	}

	
	
}
